﻿using System.Windows;

namespace DiskUsage
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            m_directoryTreeView.SelectedItemChanged += m_directoryTreeView_SelectedItemChanged;
        }

        void m_directoryTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            var value = e.NewValue as DirectoryPresentationBase;
            if (value == null) return;
            m_directoryListView.DirectoryInfo = value.DirectoryInfo;
        }
    }
}
